<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const userArr = [
        ["name", "jack"],
        ["age", 20],
        ["gender", "boy"],
      ];
      // fromEntries: Array->Object
      // entries: Object->Array
      const userObj = Object.fromEntries(userArr);
      console.log(userObj);
    </script>
  </body>
</html>
